 <meta charset="utf-8">
 <div class="card" id="biz_solutionDeviceSelect_conatainer" style="padding-bottom: 0px;min-height: 500px;">
 
   
 <div class="card">
 	<div class="card-body">
 	  <div class="row">
 	   <div class="col-md-12">
 	  <form id="searchForm" role="form" class="form-inline">
               	<div class="row" style="width: 100%">
 	 			 	<div class="col-md-9">
 	 			 
	 	 			 	<div class="form-group row">
	                         <label for="name" class="col-md-4 col-form-label">方案名称</label>
	                         <div>
	                                <input name="name"  v-model="searchForm.name"  type="text" placeholder="" class="form-control">
	                           </div>
	                    </div>
                    
 	  				</div>
 	  				
 	  					<div class="col-md-3">
 	 			 
	 	 			 	   <button type="button"  class="btn btn-info pull-right m-t-n-xs" v-kperms="{perm:''}" v-on:click="loadSolutionsDeviceNotConfiged">
		                   <i class="ti-search" aria-hidden="true"></i>
		                   <strong>查询</strong></button>
                    
 	  				</div>
 	  				
 	 		 </div>
        </form>
        <br>
        </div>
 	  </div>
        
 	<div class="row">
 	
 	  <div class="col-md-12">
           
  									<div class="table-responsive">
                                            <table class="table mb-0">
                                                <thead>
                                                    <tr>
                                                        <th>#</th>
                                                        <th>名称</th>
                                                    </tr>
                                                </thead>
                                                <tbody>
                                                    <tr  v-for="(item,index) in solutionList">
                                                        <th scope="row">
															<input type="checkbox" class="listCheckbox"  
																			  v-model="selectedSlt"
																			  v-bind:value="item.id"  />
														</th>
                                                        <td>{{item.name}}</td>
                                                    </tr>
                                                   
                                                </tbody>
                                            </table>
                                        </div>
                                        
                           
                                        
                                     
 	  </div>
 	</div>
 	</div>
 	</div>
 	 <div class="form-group" style="padding-right: 15px;padding-left: 15px;">
                 <button type="button" class="btn btn-light" v-on:click="cancel">取消</button>
                 <button type="button" class="btn btn-info float-right"  v-on:click="edit">提交</button>
              </div>   
 </div>
<script>
var anewaz=new Vue({  
	  el: '#biz_solutionDeviceSelect_conatainer', 
	  data:{
		  searchForm:{
			  name: null,
			  status: null
		  },
		  deviceId: null,
		  solutionList:[],
		  selectedSlt:[],
	      bus:new Vue()
	  },
	  mounted:function(){
		 var _this=this;
		 var param=zfesLayerEditDg.getLayerParam();
		 _this.deviceId=param.deviceId;
		 _this.loadSolutionsDeviceNotConfiged();
	  },

    methods: {
    	loadSolutionsDeviceNotConfiged: function(){
      		 var　_this=this;
      		 var url="/manager/solutionDevice/loadSolutionsDeviceNotConfiged";
 		    zfesAjax.ajaxTodo(url, {deviceId:_this.deviceId,name:_this.searchForm.name}, function(data) {
 				_this.solutionList=data.data.solutionListNotConfiged;
 			});
     	 },
     	onChooseSolution: function(id){
     		
     	},
     	edit: function () {
	    		var _this=this;
	    		var url="/manager/solutionDevice/bindDeviceSolutions";
	    		zfesAjax.ajaxJson(url,{deviceId:_this.deviceId, solutionIds:_this.selectedSlt}, function(data){
	    			alertSwal.successText(data.message);
	        		layer.close(layer.index);
	        	 })
	    		
	    },
	    cancel: function(){
	    	 layer.close(layer.index);
	    }
	  
   	
   }

});

function showDetail(row){
	anewaz.showDetail(row);
}
</script>


